
/*  A Bison parser, made from grammer.y with Bison version GNU Bison version 1.24
  */

#define YYBISON 1  /* Identify Bison output.  */

#define	ID	258
#define	STRING	259
#define	SET	260
#define	CONSTANT_INT	261
#define	CONSTANT_REAL	262
#define	CHARACTER	263
#define	DIV	264
#define	MOD	265
#define	OR_OP	266
#define	LABEL_OPTIONS	267
#define	ARRAY	268
#define	GE_OP	269
#define	LE_OP	270
#define	ASS_OP	271
#define	RANGE_OP	272
#define	IMPORT	273
#define	MODULE	274
#define	PROCEDURE	275
#define	BODY	276
#define	END	277
#define	EXIT	278
#define	BY	279
#define	CASE	280
#define	DO	281
#define	ELSE	282
#define	ELSIF	283
#define	FOR	284
#define	IF	285
#define	LOOP	286
#define	UNTIL	287
#define	WHILE	288
#define	CONST	289
#define	OF	290
#define	IN	291
#define	REPEAT	292
#define	RETURN	293
#define	THEN	294
#define	TO	295
#define	TYPE	296
#define	VAR	297
#define	NIL	298
#define	BOOLEAN	299
#define	CHAR	300
#define	INTEGER	301
#define	REAL	302
#define	UMINUS	303

#line 1 "grammer.y"

	#include <stdio.h>
	#include <malloc.h>

	#include "syntacticStructs.h"
	#include "function.h"
	
	extern int yylex(void);
	extern void yyerror(char const *c);
	extern FILE* yyin;
	
	struct StProgram *root;

#line 15 "grammer.y"
typedef union {
	int UnIntConst;
	float UnRealConst;
	char* UnID;
	char* UnStr;
	struct StExpr *UnExpr;
	struct StExprList *UnExprList;
	struct StStmt *UnStmt;
	struct StStmtList *UnStmtList;
	struct StFuncDef *UnFuncDef;
	struct StTypeSpec *UnTypeSpec;
	struct StVarDec *UnVarDec;
	struct StVarDecList *UnVarDecList;
	struct StSet *UnSet;
	struct StSetList *UnSetList;
	struct StArrayList *UnArrayList;
	struct StIdList *UnIdList;
	struct StOptionList *UnOptionList;
	struct StLabelListOptions *UnLabelListOptions;
	struct StIfStmtCondition *UnIfStmtCondition;
	struct StFuncStmtList *UnFuncStmtList;
	struct StProgram *UnProgram;
} YYSTYPE;

#ifndef YYLTYPE
typedef
  struct yyltype
    {
      int timestamp;
      int first_line;
      int first_column;
      int last_line;
      int last_column;
      char *text;
   }
  yyltype;

#define YYLTYPE yyltype
#endif

#include <stdio.h>

#ifndef __cplusplus
#ifndef __STDC__
#define const
#endif
#endif



#define	YYFINAL		255
#define	YYFLAG		-32768
#define	YYNTBASE	70

#define YYTRANSLATE(x) ((unsigned)(x) <= 303 ? yytranslate[x] : 93)

static const char yytranslate[] = {     0,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,    49,     2,     2,    56,     2,    61,
    62,    54,    52,    65,    53,    64,    55,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,    68,    63,    50,
    48,    51,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
    59,     2,    60,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,    66,    69,    67,    57,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
    16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
    26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
    36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
    46,    47,    58
};

#if YYDEBUG != 0
static const short yyprhs[] = {     0,
     0,    10,    18,    22,    26,    30,    34,    38,    42,    46,
    50,    54,    58,    62,    66,    70,    74,    78,    82,    85,
    88,    93,    97,   101,   106,   108,   110,   112,   114,   116,
   118,   120,   124,   128,   131,   137,   143,   145,   147,   151,
   155,   159,   164,   168,   173,   175,   179,   181,   185,   188,
   192,   194,   196,   198,   200,   202,   204,   208,   211,   214,
   217,   220,   223,   225,   228,   234,   242,   246,   252,   256,
   258,   264,   268,   271,   276,   281,   287,   293,   298,   308,
   320,   324,   326,   329,   331,   347,   361,   376,   389,   403,
   415,   428,   439,   441
};

static const short yyrhs[] = {    19,
     3,    63,    42,    79,    92,    22,     3,    64,     0,    19,
     3,    63,    92,    22,     3,    64,     0,    71,    52,    71,
     0,    71,    53,    71,     0,    71,    54,    71,     0,    71,
    55,    71,     0,    71,     9,    71,     0,    71,    10,    71,
     0,    71,    11,    71,     0,    71,    56,    71,     0,    71,
    16,    71,     0,    71,    48,    71,     0,    71,    49,    71,
     0,    71,    50,    71,     0,    71,    51,    71,     0,    71,
    14,    71,     0,    71,    15,    71,     0,    71,    36,    71,
     0,    57,    71,     0,    53,    71,     0,    71,    59,    71,
    60,     0,    61,    71,    62,     0,     3,    61,    62,     0,
     3,    61,    72,    62,     0,     3,     0,    73,     0,     6,
     0,     7,     0,     8,     0,     4,     0,    71,     0,    72,
    65,    71,     0,    66,    74,    67,     0,    66,    67,     0,
    66,     6,    17,     6,    67,     0,    66,     3,    17,     3,
    67,     0,     6,     0,     3,     0,    74,    65,     6,     0,
    74,    65,     3,     0,    78,    68,    80,     0,    78,    68,
    76,    80,     0,    13,    77,    35,     0,    76,    13,    77,
    35,     0,     6,     0,    77,    65,     6,     0,     3,     0,
    78,    65,     3,     0,    75,    63,     0,    79,    75,    63,
     0,    44,     0,    45,     0,    46,     0,    47,     0,     5,
     0,    75,     0,    81,    65,    75,     0,    71,    63,     0,
    84,    63,     0,    87,    63,     0,    89,    63,     0,    90,
    63,     0,    82,     0,    83,    82,     0,    25,     3,    35,
    85,    22,     0,    25,     3,    35,    85,    27,    83,    22,
     0,    86,    68,    83,     0,    85,    69,    86,    68,    83,
     0,     4,    17,     4,     0,     4,     0,    86,    65,     4,
    17,     4,     0,    86,    65,     4,     0,    88,    22,     0,
    88,    27,    83,    22,     0,    30,    71,    39,    83,     0,
    88,    28,    71,    39,    83,     0,    33,    71,    26,    83,
    22,     0,    37,    83,    32,    71,     0,    29,     3,    16,
    71,    40,    71,    26,    83,    22,     0,    29,     3,    16,
    71,    40,    71,    24,     6,    26,    83,    22,     0,    31,
    83,    22,     0,    38,     0,    38,    71,     0,    23,     0,
    20,     3,    61,    81,    62,    68,    80,    63,    42,    79,
    21,    83,    22,     3,    63,     0,    20,     3,    61,    81,
    62,    63,    42,    79,    21,    83,    22,     3,    63,     0,
    20,     3,    61,    62,    68,    80,    63,    42,    79,    21,
    83,    22,     3,    63,     0,    20,     3,    61,    62,    63,
    42,    79,    21,    83,    22,     3,    63,     0,    20,     3,
    61,    81,    62,    68,    80,    63,    21,    83,    22,     3,
    63,     0,    20,     3,    61,    81,    62,    63,    21,    83,
    22,     3,    63,     0,    20,     3,    61,    62,    68,    80,
    63,    21,    83,    22,     3,    63,     0,    20,     3,    61,
    62,    63,    21,    83,    22,     3,    63,     0,    91,     0,
    92,    91,     0
};

#endif

#if YYDEBUG != 0
static const short yyrline[] = { 0,
    89,    90,    93,    94,    95,    96,    97,    98,    99,   100,
   101,   102,   103,   104,   105,   106,   107,   108,   110,   111,
   113,   115,   117,   118,   120,   121,   122,   123,   124,   125,
   129,   130,   134,   135,   136,   137,   141,   142,   143,   144,
   148,   149,   153,   154,   158,   159,   163,   164,   168,   169,
   173,   174,   175,   176,   177,   181,   182,   186,   187,   188,
   189,   190,   194,   195,   199,   200,   204,   205,   209,   210,
   211,   212,   216,   217,   221,   222,   226,   227,   228,   229,
   230,   234,   235,   236,   240,   241,   242,   243,   244,   245,
   246,   247,   251,   252
};

static const char * const yytname[] = {   "$","error","$undefined.","ID","STRING",
"SET","CONSTANT_INT","CONSTANT_REAL","CHARACTER","DIV","MOD","OR_OP","LABEL_OPTIONS",
"ARRAY","GE_OP","LE_OP","ASS_OP","RANGE_OP","IMPORT","MODULE","PROCEDURE","BODY",
"END","EXIT","BY","CASE","DO","ELSE","ELSIF","FOR","IF","LOOP","UNTIL","WHILE",
"CONST","OF","IN","REPEAT","RETURN","THEN","TO","TYPE","VAR","NIL","BOOLEAN",
"CHAR","INTEGER","REAL","'='","'#'","'<'","'>'","'+'","'-'","'*'","'/'","'&'",
"'~'","UMINUS","'['","']'","'('","')'","';'","'.'","','","'{'","'}'","':'","'|'",
"program","expr","expr_list","set","set_list","var_declaration","array_list",
"constant_list","id_list","var_declaration_list","type_specifier","parameter_list",
"stmt","stmt_list","case_stmt","option_list","label_list_options","if_stmt",
"if_stmt_condition","cycle_stmt","jump_stmt","func_definition","func_definition_list",
""
};
#endif

static const short yyr1[] = {     0,
    70,    70,    71,    71,    71,    71,    71,    71,    71,    71,
    71,    71,    71,    71,    71,    71,    71,    71,    71,    71,
    71,    71,    71,    71,    71,    71,    71,    71,    71,    71,
    72,    72,    73,    73,    73,    73,    74,    74,    74,    74,
    75,    75,    76,    76,    77,    77,    78,    78,    79,    79,
    80,    80,    80,    80,    80,    81,    81,    82,    82,    82,
    82,    82,    83,    83,    84,    84,    85,    85,    86,    86,
    86,    86,    87,    87,    88,    88,    89,    89,    89,    89,
    89,    90,    90,    90,    91,    91,    91,    91,    91,    91,
    91,    91,    92,    92
};

static const short yyr2[] = {     0,
     9,     7,     3,     3,     3,     3,     3,     3,     3,     3,
     3,     3,     3,     3,     3,     3,     3,     3,     2,     2,
     4,     3,     3,     4,     1,     1,     1,     1,     1,     1,
     1,     3,     3,     2,     5,     5,     1,     1,     3,     3,
     3,     4,     3,     4,     1,     3,     1,     3,     2,     3,
     1,     1,     1,     1,     1,     1,     3,     2,     2,     2,
     2,     2,     1,     2,     5,     7,     3,     5,     3,     1,
     5,     3,     2,     4,     4,     5,     5,     4,     9,    11,
     3,     1,     2,     1,    15,    13,    14,    12,    13,    11,
    12,    10,     1,     2
};

static const short yydefact[] = {     0,
     0,     0,     0,     0,     0,    93,     0,     0,    47,     0,
     0,     0,     0,    94,     0,    49,     0,     0,     0,     0,
     0,     0,    56,     0,    48,    55,     0,    51,    52,    53,
    54,     0,    41,    50,     0,     2,     0,     0,     0,     0,
    45,     0,     0,    42,     0,     0,     0,     0,     0,     0,
    57,    43,     0,     0,     1,    25,    30,    27,    28,    29,
    84,     0,     0,     0,     0,     0,     0,    82,     0,     0,
     0,     0,     0,    26,    63,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,    46,    44,     0,     0,
     0,     0,     0,     0,     0,    83,    20,    19,     0,    38,
    37,    34,     0,     0,     0,     0,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
    58,     0,    64,    59,    60,    73,     0,     0,    61,    62,
     0,     0,     0,     0,     0,     0,    23,    31,     0,     0,
     0,     0,    81,     0,     0,    22,     0,     0,     0,    33,
     7,     8,     9,    16,    17,    11,    18,    12,    13,    14,
    15,     3,     4,     5,     6,    10,     0,     0,     0,     0,
     0,     0,     0,     0,     0,     0,     0,    24,     0,    70,
     0,     0,     0,    75,     0,    78,     0,     0,    40,    39,
    21,    92,    74,     0,     0,     0,     0,     0,     0,     0,
     0,    32,     0,    65,     0,     0,     0,     0,     0,    77,
    36,    35,    76,     0,     0,     0,    90,     0,     0,     0,
    69,     0,     0,    72,    67,     0,    88,    91,     0,     0,
     0,     0,    66,     0,     0,     0,     0,     0,    86,    89,
     0,    68,    71,     0,     0,    87,     0,     0,    79,    85,
     0,    80,     0,     0,     0
};

static const short yydefgoto[] = {   253,
    73,   139,    74,   103,    10,    32,    42,    11,    12,    33,
    24,    75,    76,    77,   181,   182,    78,    79,    80,    81,
     6,     7
};

static const short yypact[] = {    -1,
    19,    14,    -7,    75,    84,-32768,    72,     6,-32768,    52,
    56,    43,   117,-32768,     3,-32768,   119,    29,    74,    94,
    85,   -10,-32768,    64,-32768,-32768,   132,-32768,-32768,-32768,
-32768,   192,-32768,-32768,   136,-32768,    -6,   182,    25,    84,
-32768,   -34,   132,-32768,    86,   785,    84,    89,    -5,   182,
-32768,-32768,   147,   -27,-32768,    93,-32768,-32768,-32768,-32768,
-32768,   155,   156,   827,   785,   827,   785,   827,   827,   827,
   827,     4,   849,-32768,-32768,   187,    97,   102,    -3,   103,
   105,     9,     2,   785,    84,   110,-32768,-32768,   821,   141,
   159,   980,   227,  1011,   266,  1094,   118,   118,   880,   162,
   163,-32768,   -15,   827,   827,   827,   827,   827,   827,   827,
   827,   827,   827,   827,   827,   827,   827,   827,   827,   827,
-32768,   179,-32768,-32768,-32768,-32768,   785,   827,-32768,-32768,
   785,   785,    84,   306,    24,     5,-32768,  1094,    68,   180,
   827,   785,-32768,   785,   827,-32768,   183,   177,   140,-32768,
   118,   118,   108,    30,    30,  1094,    30,    30,    30,    30,
    30,   108,   108,   118,   118,   118,   904,   129,   346,  1035,
   386,   426,    45,   193,   785,   785,    84,-32768,   827,   185,
   -13,    79,  1066,   785,   466,  1094,   137,   139,-32768,-32768,
-32768,-32768,-32768,   785,   196,   200,   785,   145,   506,   546,
    51,  1094,   207,-32768,   785,   180,   209,   785,   827,-32768,
-32768,-32768,   785,   151,   152,   586,-32768,   216,   218,   785,
-32768,   626,    83,   205,   785,   956,-32768,-32768,   220,   169,
   178,   666,-32768,   785,   238,   237,   785,   184,-32768,-32768,
   242,   785,-32768,   225,   706,-32768,   191,   785,-32768,-32768,
   746,-32768,   246,   255,-32768
};

static const short yypgoto[] = {-32768,
    -9,-32768,-32768,-32768,   -12,-32768,   219,-32768,   -42,   -21,
-32768,   -44,   -63,-32768,-32768,    53,-32768,-32768,-32768,-32768,
    13,   249
};


#define	YYLAST		1153


static const short yytable[] = {    19,
    52,    93,    23,    95,    82,     9,   100,    88,   204,   101,
    44,     9,     4,   205,    46,    84,    48,     1,   126,    14,
   134,     2,   132,   127,   128,   176,     9,    51,    86,   131,
    53,   123,    14,    26,     5,    47,    85,    53,   104,   105,
   106,    27,   135,   133,   175,     9,   177,     9,   123,   149,
   123,   150,    37,     9,    92,   206,    94,    38,    96,    97,
    98,    99,     4,   169,    22,   197,    15,   171,   172,    19,
   102,   220,    28,    29,    30,    31,     3,     8,   184,   138,
   185,   115,   116,   117,   118,   119,     9,    49,   120,   123,
   173,     4,    50,    13,   151,   152,   153,   154,   155,   156,
   157,   158,   159,   160,   161,   162,   163,   164,   165,   166,
   167,   199,   200,     4,    16,    35,   104,   105,   170,    21,
    17,    25,    19,    18,   123,    39,   123,   123,    40,   178,
   213,   183,   179,   216,   201,   186,    34,    41,    45,   123,
   123,   222,   189,   207,   225,   190,   208,   207,    36,    55,
   234,    83,    87,    89,   123,   123,   232,    90,    91,   124,
    19,   117,   118,   119,   125,   129,   120,   130,   123,   202,
   242,   123,   136,   245,   141,   140,   120,   123,   147,   148,
   123,   168,   188,   180,   251,   187,    26,   123,    19,    56,
    57,   192,    58,    59,    60,   198,    26,   123,   214,   226,
   123,   203,   215,   211,    43,   212,   123,   217,   122,    61,
   221,    62,   224,   227,   228,    63,    64,    65,   230,    66,
   231,   235,   238,    67,    68,    28,    29,    30,    31,    56,
    57,   239,    58,    59,    60,    28,    29,    30,    31,    69,
   240,   243,   244,    70,   247,   254,   246,    71,   143,    61,
   248,    62,    72,   250,   255,    63,    64,    65,   223,    66,
    20,    54,     0,    67,    68,     0,     0,     0,    56,    57,
     0,    58,    59,    60,     0,     0,     0,     0,     0,    69,
     0,     0,     0,    70,     0,     0,     0,    71,    61,     0,
    62,     0,    72,     0,    63,    64,    65,   145,    66,     0,
     0,     0,    67,    68,     0,     0,     0,     0,    56,    57,
     0,    58,    59,    60,     0,     0,     0,     0,    69,     0,
     0,     0,    70,     0,     0,     0,    71,   174,    61,     0,
    62,    72,     0,     0,    63,    64,    65,     0,    66,     0,
     0,     0,    67,    68,     0,     0,     0,     0,    56,    57,
     0,    58,    59,    60,     0,     0,     0,     0,    69,     0,
     0,     0,    70,     0,     0,     0,    71,   193,    61,     0,
    62,    72,     0,     0,    63,    64,    65,     0,    66,     0,
     0,     0,    67,    68,     0,     0,     0,     0,    56,    57,
     0,    58,    59,    60,     0,     0,     0,     0,    69,     0,
     0,     0,    70,     0,     0,     0,    71,   195,    61,     0,
    62,    72,     0,     0,    63,    64,    65,     0,    66,     0,
     0,     0,    67,    68,     0,     0,     0,     0,    56,    57,
     0,    58,    59,    60,     0,     0,     0,     0,    69,     0,
     0,     0,    70,     0,     0,     0,    71,   196,    61,     0,
    62,    72,     0,     0,    63,    64,    65,     0,    66,     0,
     0,     0,    67,    68,     0,     0,     0,     0,    56,    57,
     0,    58,    59,    60,     0,     0,     0,     0,    69,     0,
     0,     0,    70,     0,     0,     0,    71,   210,    61,     0,
    62,    72,     0,     0,    63,    64,    65,     0,    66,     0,
     0,     0,    67,    68,     0,     0,     0,     0,    56,    57,
     0,    58,    59,    60,     0,     0,     0,     0,    69,     0,
     0,     0,    70,     0,     0,     0,    71,   218,    61,     0,
    62,    72,     0,     0,    63,    64,    65,     0,    66,     0,
     0,     0,    67,    68,     0,     0,     0,     0,    56,    57,
     0,    58,    59,    60,     0,     0,     0,     0,    69,     0,
     0,     0,    70,     0,     0,     0,    71,   219,    61,     0,
    62,    72,     0,     0,    63,    64,    65,     0,    66,     0,
     0,     0,    67,    68,     0,     0,     0,     0,    56,    57,
     0,    58,    59,    60,     0,     0,     0,     0,    69,     0,
     0,     0,    70,     0,     0,     0,    71,   229,    61,     0,
    62,    72,     0,     0,    63,    64,    65,     0,    66,     0,
     0,     0,    67,    68,     0,     0,     0,     0,    56,    57,
     0,    58,    59,    60,     0,     0,     0,     0,    69,     0,
     0,     0,    70,     0,     0,     0,    71,   233,    61,     0,
    62,    72,     0,     0,    63,    64,    65,     0,    66,     0,
     0,     0,    67,    68,     0,     0,     0,     0,    56,    57,
     0,    58,    59,    60,     0,     0,     0,     0,    69,     0,
     0,     0,    70,     0,     0,     0,    71,   241,    61,     0,
    62,    72,     0,     0,    63,    64,    65,     0,    66,     0,
     0,     0,    67,    68,     0,     0,     0,     0,    56,    57,
     0,    58,    59,    60,     0,     0,     0,     0,    69,     0,
     0,     0,    70,     0,     0,     0,    71,   249,    61,     0,
    62,    72,     0,     0,    63,    64,    65,     0,    66,     0,
     0,     0,    67,    68,     0,     0,     0,     0,    56,    57,
     0,    58,    59,    60,     0,     0,     0,     0,    69,     0,
     0,     0,    70,     0,     0,     0,    71,   252,    61,     0,
    62,    72,     0,     0,    63,    64,    65,     0,    66,     0,
     0,     0,    67,    68,     0,     0,     0,    56,    57,     0,
    58,    59,    60,     0,     0,     0,     0,     0,    69,     0,
     0,     0,    70,     0,     0,     0,    71,    61,     0,    62,
     0,    72,     0,    63,    64,    65,     0,    66,     0,     0,
     0,    67,    68,    56,    57,     0,    58,    59,    60,    56,
    57,     0,    58,    59,    60,     0,     0,    69,     0,     0,
     0,    70,     0,     0,     0,    71,     0,     0,     0,     0,
    72,     0,     0,     0,     0,     0,     0,   104,   105,   106,
     0,     0,   107,   108,   109,     0,     0,     0,     0,     0,
     0,     0,     0,    69,     0,     0,     0,    70,     0,    69,
     0,    71,   137,    70,   110,     0,    72,    71,   104,   105,
   106,     0,    72,   107,   108,   109,   111,   112,   113,   114,
   115,   116,   117,   118,   119,     0,     0,   120,     0,     0,
     0,   121,   104,   105,   106,   110,     0,   107,   108,   109,
     0,     0,     0,     0,     0,     0,     0,   111,   112,   113,
   114,   115,   116,   117,   118,   119,     0,     0,   120,   110,
     0,   146,     0,     0,     0,     0,     0,     0,     0,     0,
     0,   111,   112,   113,   114,   115,   116,   117,   118,   119,
     0,     0,   120,   191,   104,   105,   106,     0,     0,   107,
   108,   109,     0,     0,     0,     0,     0,     0,     0,   236,
     0,   237,     0,     0,     0,     0,     0,     0,   104,   105,
   106,   110,     0,   107,   108,   109,     0,     0,     0,     0,
     0,     0,     0,   111,   112,   113,   114,   115,   116,   117,
   118,   119,     0,     0,   120,   110,     0,     0,   142,   104,
   105,   106,     0,     0,   107,   108,   109,   111,   112,   113,
   114,   115,   116,   117,   118,   119,   144,     0,   120,     0,
     0,     0,     0,   104,   105,   106,   110,     0,   107,   108,
   109,     0,     0,     0,     0,     0,     0,     0,   111,   112,
   113,   114,   115,   116,   117,   118,   119,     0,     0,   120,
   110,     0,     0,   194,   104,   105,   106,     0,     0,   107,
   108,   109,   111,   112,   113,   114,   115,   116,   117,   118,
   119,     0,     0,   120,     0,     0,     0,     0,     0,     0,
     0,   110,   104,   105,   106,   209,     0,   107,   108,   109,
     0,     0,     0,   111,   112,   113,   114,   115,   116,   117,
   118,   119,     0,     0,   120,     0,     0,     0,     0,   110,
     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
     0,   111,   112,   113,   114,   115,   116,   117,   118,   119,
     0,     0,   120
};

static const short yycheck[] = {    12,
    35,    65,    15,    67,    47,     3,     3,    35,    22,     6,
    32,     3,    20,    27,    21,    21,    38,    19,    22,     7,
    84,     3,    21,    27,    28,    21,     3,    40,    50,    21,
    65,    76,    20,     5,    42,    42,    42,    65,     9,    10,
    11,    13,    85,    42,    21,     3,    42,     3,    93,    65,
    95,    67,    63,     3,    64,    69,    66,    68,    68,    69,
    70,    71,    20,   127,    62,    21,    61,   131,   132,    82,
    67,    21,    44,    45,    46,    47,    63,     3,   142,    89,
   144,    52,    53,    54,    55,    56,     3,    63,    59,   134,
   133,    20,    68,    22,   104,   105,   106,   107,   108,   109,
   110,   111,   112,   113,   114,   115,   116,   117,   118,   119,
   120,   175,   176,    20,    63,    22,     9,    10,   128,     3,
    65,     3,   135,    68,   169,    62,   171,   172,    65,    62,
   194,   141,    65,   197,   177,   145,    63,     6,     3,   184,
   185,   205,     3,    65,   208,     6,    68,    65,    64,    64,
    68,    63,     6,    61,   199,   200,   220,     3,     3,    63,
   173,    54,    55,    56,    63,    63,    59,    63,   213,   179,
   234,   216,    63,   237,    16,    35,    59,   222,    17,    17,
   225,     3,     6,     4,   248,     3,     5,   232,   201,     3,
     4,    63,     6,     7,     8,     3,     5,   242,     3,   209,
   245,    17,     3,    67,    13,    67,   251,    63,    22,    23,
     4,    25,     4,    63,    63,    29,    30,    31,     3,    33,
     3,    17,     3,    37,    38,    44,    45,    46,    47,     3,
     4,    63,     6,     7,     8,    44,    45,    46,    47,    53,
    63,     4,     6,    57,     3,     0,    63,    61,    22,    23,
    26,    25,    66,    63,     0,    29,    30,    31,   206,    33,
    12,    43,    -1,    37,    38,    -1,    -1,    -1,     3,     4,
    -1,     6,     7,     8,    -1,    -1,    -1,    -1,    -1,    53,
    -1,    -1,    -1,    57,    -1,    -1,    -1,    61,    23,    -1,
    25,    -1,    66,    -1,    29,    30,    31,    32,    33,    -1,
    -1,    -1,    37,    38,    -1,    -1,    -1,    -1,     3,     4,
    -1,     6,     7,     8,    -1,    -1,    -1,    -1,    53,    -1,
    -1,    -1,    57,    -1,    -1,    -1,    61,    22,    23,    -1,
    25,    66,    -1,    -1,    29,    30,    31,    -1,    33,    -1,
    -1,    -1,    37,    38,    -1,    -1,    -1,    -1,     3,     4,
    -1,     6,     7,     8,    -1,    -1,    -1,    -1,    53,    -1,
    -1,    -1,    57,    -1,    -1,    -1,    61,    22,    23,    -1,
    25,    66,    -1,    -1,    29,    30,    31,    -1,    33,    -1,
    -1,    -1,    37,    38,    -1,    -1,    -1,    -1,     3,     4,
    -1,     6,     7,     8,    -1,    -1,    -1,    -1,    53,    -1,
    -1,    -1,    57,    -1,    -1,    -1,    61,    22,    23,    -1,
    25,    66,    -1,    -1,    29,    30,    31,    -1,    33,    -1,
    -1,    -1,    37,    38,    -1,    -1,    -1,    -1,     3,     4,
    -1,     6,     7,     8,    -1,    -1,    -1,    -1,    53,    -1,
    -1,    -1,    57,    -1,    -1,    -1,    61,    22,    23,    -1,
    25,    66,    -1,    -1,    29,    30,    31,    -1,    33,    -1,
    -1,    -1,    37,    38,    -1,    -1,    -1,    -1,     3,     4,
    -1,     6,     7,     8,    -1,    -1,    -1,    -1,    53,    -1,
    -1,    -1,    57,    -1,    -1,    -1,    61,    22,    23,    -1,
    25,    66,    -1,    -1,    29,    30,    31,    -1,    33,    -1,
    -1,    -1,    37,    38,    -1,    -1,    -1,    -1,     3,     4,
    -1,     6,     7,     8,    -1,    -1,    -1,    -1,    53,    -1,
    -1,    -1,    57,    -1,    -1,    -1,    61,    22,    23,    -1,
    25,    66,    -1,    -1,    29,    30,    31,    -1,    33,    -1,
    -1,    -1,    37,    38,    -1,    -1,    -1,    -1,     3,     4,
    -1,     6,     7,     8,    -1,    -1,    -1,    -1,    53,    -1,
    -1,    -1,    57,    -1,    -1,    -1,    61,    22,    23,    -1,
    25,    66,    -1,    -1,    29,    30,    31,    -1,    33,    -1,
    -1,    -1,    37,    38,    -1,    -1,    -1,    -1,     3,     4,
    -1,     6,     7,     8,    -1,    -1,    -1,    -1,    53,    -1,
    -1,    -1,    57,    -1,    -1,    -1,    61,    22,    23,    -1,
    25,    66,    -1,    -1,    29,    30,    31,    -1,    33,    -1,
    -1,    -1,    37,    38,    -1,    -1,    -1,    -1,     3,     4,
    -1,     6,     7,     8,    -1,    -1,    -1,    -1,    53,    -1,
    -1,    -1,    57,    -1,    -1,    -1,    61,    22,    23,    -1,
    25,    66,    -1,    -1,    29,    30,    31,    -1,    33,    -1,
    -1,    -1,    37,    38,    -1,    -1,    -1,    -1,     3,     4,
    -1,     6,     7,     8,    -1,    -1,    -1,    -1,    53,    -1,
    -1,    -1,    57,    -1,    -1,    -1,    61,    22,    23,    -1,
    25,    66,    -1,    -1,    29,    30,    31,    -1,    33,    -1,
    -1,    -1,    37,    38,    -1,    -1,    -1,    -1,     3,     4,
    -1,     6,     7,     8,    -1,    -1,    -1,    -1,    53,    -1,
    -1,    -1,    57,    -1,    -1,    -1,    61,    22,    23,    -1,
    25,    66,    -1,    -1,    29,    30,    31,    -1,    33,    -1,
    -1,    -1,    37,    38,    -1,    -1,    -1,    -1,     3,     4,
    -1,     6,     7,     8,    -1,    -1,    -1,    -1,    53,    -1,
    -1,    -1,    57,    -1,    -1,    -1,    61,    22,    23,    -1,
    25,    66,    -1,    -1,    29,    30,    31,    -1,    33,    -1,
    -1,    -1,    37,    38,    -1,    -1,    -1,     3,     4,    -1,
     6,     7,     8,    -1,    -1,    -1,    -1,    -1,    53,    -1,
    -1,    -1,    57,    -1,    -1,    -1,    61,    23,    -1,    25,
    -1,    66,    -1,    29,    30,    31,    -1,    33,    -1,    -1,
    -1,    37,    38,     3,     4,    -1,     6,     7,     8,     3,
     4,    -1,     6,     7,     8,    -1,    -1,    53,    -1,    -1,
    -1,    57,    -1,    -1,    -1,    61,    -1,    -1,    -1,    -1,
    66,    -1,    -1,    -1,    -1,    -1,    -1,     9,    10,    11,
    -1,    -1,    14,    15,    16,    -1,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    53,    -1,    -1,    -1,    57,    -1,    53,
    -1,    61,    62,    57,    36,    -1,    66,    61,     9,    10,
    11,    -1,    66,    14,    15,    16,    48,    49,    50,    51,
    52,    53,    54,    55,    56,    -1,    -1,    59,    -1,    -1,
    -1,    63,     9,    10,    11,    36,    -1,    14,    15,    16,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    48,    49,    50,
    51,    52,    53,    54,    55,    56,    -1,    -1,    59,    36,
    -1,    62,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    48,    49,    50,    51,    52,    53,    54,    55,    56,
    -1,    -1,    59,    60,     9,    10,    11,    -1,    -1,    14,
    15,    16,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    24,
    -1,    26,    -1,    -1,    -1,    -1,    -1,    -1,     9,    10,
    11,    36,    -1,    14,    15,    16,    -1,    -1,    -1,    -1,
    -1,    -1,    -1,    48,    49,    50,    51,    52,    53,    54,
    55,    56,    -1,    -1,    59,    36,    -1,    -1,    39,     9,
    10,    11,    -1,    -1,    14,    15,    16,    48,    49,    50,
    51,    52,    53,    54,    55,    56,    26,    -1,    59,    -1,
    -1,    -1,    -1,     9,    10,    11,    36,    -1,    14,    15,
    16,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    48,    49,
    50,    51,    52,    53,    54,    55,    56,    -1,    -1,    59,
    36,    -1,    -1,    39,     9,    10,    11,    -1,    -1,    14,
    15,    16,    48,    49,    50,    51,    52,    53,    54,    55,
    56,    -1,    -1,    59,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    36,     9,    10,    11,    40,    -1,    14,    15,    16,
    -1,    -1,    -1,    48,    49,    50,    51,    52,    53,    54,
    55,    56,    -1,    -1,    59,    -1,    -1,    -1,    -1,    36,
    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
    -1,    48,    49,    50,    51,    52,    53,    54,    55,    56,
    -1,    -1,    59
};
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
#line 3 "bison.simple"

/* Skeleton output parser for bison,
   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */

/* As a special exception, when this file is copied by Bison into a
   Bison output file, you may use that output file without restriction.
   This special exception was added by the Free Software Foundation
   in version 1.24 of Bison.  */

#ifndef alloca
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C.  */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
#include <malloc.h>
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
#include <malloc.h>
 #pragma alloca
#else /* not MSDOS, __TURBOC__, or _AIX */
#ifdef __hpux
#ifdef __cplusplus
extern "C" {
void *alloca (unsigned int);
};
#else /* not __cplusplus */
void *alloca ();
#endif /* not __cplusplus */
#endif /* __hpux */
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc.  */
#endif /* not GNU C.  */
#endif /* alloca not defined.  */

/* This is the parser code that is written into each bison parser
  when the %semantic_parser declaration is not specified in the grammar.
  It was written by Richard Stallman by simplifying the hairy parser
  used when %semantic_parser is specified.  */

/* Note: there must be only one dollar sign in this file.
   It is replaced by the list of actions, each action
   as one case of the switch.  */

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		-2
#define YYEOF		0
#define YYACCEPT	return(0)
#define YYABORT 	return(1)
#define YYERROR		goto yyerrlab1
/* Like YYERROR except do call yyerror.
   This remains here temporarily to ease the
   transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */
#define YYFAIL		goto yyerrlab
#define YYRECOVERING()  (!!yyerrstatus)
#define YYBACKUP(token, value) \
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
    { yychar = (token), yylval = (value);			\
      yychar1 = YYTRANSLATE (yychar);				\
      YYPOPSTACK;						\
      goto yybackup;						\
    }								\
  else								\
    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
while (0)

#define YYTERROR	1
#define YYERRCODE	256

#ifndef YYPURE
#define YYLEX		yylex()
#endif

#ifdef YYPURE
#ifdef YYLSP_NEEDED
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval, &yylloc)
#endif
#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval)
#endif
#endif /* not YYLSP_NEEDED */
#endif

/* If nonreentrant, generate the variables here */

#ifndef YYPURE

int	yychar;			/*  the lookahead symbol		*/
YYSTYPE	yylval;			/*  the semantic value of the		*/
				/*  lookahead symbol			*/

#ifdef YYLSP_NEEDED
YYLTYPE yylloc;			/*  location data for the lookahead	*/
				/*  symbol				*/
#endif

int yynerrs;			/*  number of parse errors so far       */
#endif  /* not YYPURE */

#if YYDEBUG != 0
int yydebug;			/*  nonzero means print parse trace	*/
/* Since this is uninitialized, it does not stop multiple parsers
   from coexisting.  */
#endif

/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/

#ifndef	YYINITDEPTH
#define YYINITDEPTH 200
#endif

/*  YYMAXDEPTH is the maximum size the stacks can grow to
    (effective only if the built-in stack extension method is used).  */

#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif

/* Prevent warning if -Wstrict-prototypes.  */
#ifdef __GNUC__
int yyparse (void);
#endif

#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
#define __yy_memcpy(FROM,TO,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
#else				/* not GNU C or C++ */
#ifndef __cplusplus

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_memcpy (from, to, count)
     char *from;
     char *to;
     int count;
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#else /* __cplusplus */

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_memcpy (char *from, char *to, int count)
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#endif
#endif

#line 192 "bison.simple"

/* The user can define YYPARSE_PARAM as the name of an argument to be passed
   into yyparse.  The argument should have type void *.
   It should actually point to an object.
   Grammar actions can access the variable by casting it
   to the proper pointer type.  */

#ifdef YYPARSE_PARAM
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
#else
#define YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
#endif

int
yyparse(YYPARSE_PARAM)
     YYPARSE_PARAM_DECL
{
  register int yystate;
  register int yyn;
  register short *yyssp;
  register YYSTYPE *yyvsp;
  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
  int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */

  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/

  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */

#ifdef YYLSP_NEEDED
  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
  YYLTYPE *yyls = yylsa;
  YYLTYPE *yylsp;

#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK   (yyvsp--, yyssp--)
#endif

  int yystacksize = YYINITDEPTH;

#ifdef YYPURE
  int yychar;
  YYSTYPE yylval;
  int yynerrs;
#ifdef YYLSP_NEEDED
  YYLTYPE yylloc;
#endif
#endif

  YYSTYPE yyval;		/*  the variable used to return		*/
				/*  semantic values from the action	*/
				/*  routines				*/

  int yylen;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Starting parse\n");
#endif

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;		/* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss - 1;
  yyvsp = yyvs;
#ifdef YYLSP_NEEDED
  yylsp = yyls;
#endif

/* Push a new state, which is found in  yystate  .  */
/* In all cases, when you get here, the value and location stacks
   have just been pushed. so pushing a state here evens the stacks.  */
yynewstate:

  *++yyssp = yystate;

  if (yyssp >= yyss + yystacksize - 1)
    {
      /* Give user a chance to reallocate the stack */
      /* Use copies of these so that the &'s don't force the real ones into memory. */
      YYSTYPE *yyvs1 = yyvs;
      short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
      YYLTYPE *yyls1 = yyls;
#endif

      /* Get the current used size of the three stacks, in elements.  */
      int size = yyssp - yyss + 1;

#ifdef yyoverflow
      /* Each stack pointer address is followed by the size of
	 the data in use in that stack, in bytes.  */
#ifdef YYLSP_NEEDED
      /* This used to be a conditional around just the two extra args,
	 but that might be undefined if yyoverflow is a macro.  */
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yyls1, size * sizeof (*yylsp),
		 &yystacksize);
#else
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yystacksize);
#endif

      yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
      yyls = yyls1;
#endif
#else /* no yyoverflow */
      /* Extend the stack our own way.  */
      if (yystacksize >= YYMAXDEPTH)
	{
	  yyerror("parser stack overflow");
	  return 2;
	}
      yystacksize *= 2;
      if (yystacksize > YYMAXDEPTH)
	yystacksize = YYMAXDEPTH;
      yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
      __yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
      yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
      __yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
      yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
      __yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */

      yyssp = yyss + size - 1;
      yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
      yylsp = yyls + size - 1;
#endif

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif

      if (yyssp >= yyss + yystacksize - 1)
	YYABORT;
    }

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Entering state %d\n", yystate);
#endif

  goto yybackup;
 yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* yychar is either YYEMPTY or YYEOF
     or a valid token in external form.  */

  if (yychar == YYEMPTY)
    {
#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Reading a token: ");
#endif
      yychar = YYLEX;
    }

  /* Convert token to internal form (in yychar1) for indexing tables with */

  if (yychar <= 0)		/* This means end of input. */
    {
      yychar1 = 0;
      yychar = YYEOF;		/* Don't call YYLEX any more */

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Now at end of input.\n");
#endif
    }
  else
    {
      yychar1 = YYTRANSLATE(yychar);

#if YYDEBUG != 0
      if (yydebug)
	{
	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
	  /* Give the individual parser a way to print the precise meaning
	     of a token, for further debugging info.  */
#ifdef YYPRINT
	  YYPRINT (stderr, yychar, yylval);
#endif
	  fprintf (stderr, ")\n");
	}
#endif
    }

  yyn += yychar1;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
    goto yydefault;

  yyn = yytable[yyn];

  /* yyn is what to do for this token type in this state.
     Negative => reduce, -yyn is rule number.
     Positive => shift, yyn is new state.
       New state is final state => don't bother to shift,
       just return success.
     0, or most negative number => error.  */

  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrlab;

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  /* count tokens shifted since error; after three, turn off error status.  */
  if (yyerrstatus) yyerrstatus--;

  yystate = yyn;
  goto yynewstate;

/* Do the default action for the current state.  */
yydefault:

  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;

/* Do a reduction.  yyn is the number of a rule to reduce with.  */
yyreduce:
  yylen = yyr2[yyn];
  if (yylen > 0)
    yyval = yyvsp[1-yylen]; /* implement default value of the action */

#if YYDEBUG != 0
  if (yydebug)
    {
      int i;

      fprintf (stderr, "Reducing via rule %d (line %d), ",
	       yyn, yyrline[yyn]);

      /* Print the symbols being reduced, and their result.  */
      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
    }
#endif


  switch (yyn) {

case 1:
#line 89 "grammer.y"
{root = CreateProgram(yyvsp[-7].UnID, yyvsp[-4].UnVarDecList, yyvsp[-3].UnFuncStmtList);
    break;}
case 2:
#line 90 "grammer.y"
{root = CreateProgram(yyvsp[-5].UnID, NULL, yyvsp[-3].UnFuncStmtList);
    break;}
case 3:
#line 93 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnPlus, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 4:
#line 94 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnMinus, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 5:
#line 95 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnMultiply, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 6:
#line 96 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnDivision, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 7:
#line 97 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnDiv, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 8:
#line 98 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnMod, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 9:
#line 99 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnOr, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 10:
#line 100 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnAnd, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 11:
#line 101 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnAssignment, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 12:
#line 102 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnCompare, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 13:
#line 103 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnNotCompare, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 14:
#line 104 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnLess, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 15:
#line 105 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnMore, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 16:
#line 106 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnMoreEqually, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 17:
#line 107 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnLessEqually, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 18:
#line 108 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnIn, yyvsp[-2].UnExpr, yyvsp[0].UnExpr);
    break;}
case 19:
#line 110 "grammer.y"
{yyval.UnExpr = CreateUnaryExpr(EnNot, yyvsp[0].UnExpr);
    break;}
case 20:
#line 111 "grammer.y"
{yyval.UnExpr = CreateUnaryExpr(EnUnMinus, yyvsp[0].UnExpr);
    break;}
case 21:
#line 113 "grammer.y"
{yyval.UnExpr = CreateBinaryExpr(EnArrayAccess, yyvsp[-3].UnExpr, yyvsp[-1].UnExpr);
    break;}
case 22:
#line 115 "grammer.y"
{yyval.UnExpr = yyvsp[-1].UnExpr;
    break;}
case 23:
#line 117 "grammer.y"
{yyval.UnExpr = CreateFunctionCallExpr(yyvsp[-2].UnID, NULL);
    break;}
case 24:
#line 118 "grammer.y"
{yyval.UnExpr = CreateFunctionCallExpr(yyvsp[-3].UnID, yyvsp[-1].UnExprList);
    break;}
case 25:
#line 120 "grammer.y"
{yyval.UnExpr = CreateIdentifierExpr(yyvsp[0].UnID);
    break;}
case 26:
#line 121 "grammer.y"
{yyval.UnExpr = CreateExprSet(yyvsp[0].UnSet);
    break;}
case 27:
#line 122 "grammer.y"
{yyval.UnExpr = CreateConstIntExpr(yyvsp[0].UnIntConst);
    break;}
case 28:
#line 123 "grammer.y"
{yyval.UnExpr = CreateConstRealExpr(yyvsp[0].UnRealConst);
    break;}
case 29:
#line 124 "grammer.y"
{yyval.UnExpr = CreateCharacterExpr(yyvsp[0].UnStr);
    break;}
case 30:
#line 125 "grammer.y"
{yyval.UnExpr = CreateStringExpr(yyvsp[0].UnStr);
    break;}
case 31:
#line 129 "grammer.y"
{yyval.UnExprList = CreateExpressionList(yyvsp[0].UnExpr);
    break;}
case 32:
#line 130 "grammer.y"
{yyval.UnExprList = AddToExpressionList(yyvsp[-2].UnExprList, yyvsp[0].UnExpr);
    break;}
case 33:
#line 134 "grammer.y"
{yyval.UnSet = CreateSetExpr1(yyvsp[-1].UnSetList);
    break;}
case 34:
#line 135 "grammer.y"
{yyval.UnSet = NULL;
    break;}
case 35:
#line 136 "grammer.y"
{yyval.UnSet = CreateSetExpr(yyvsp[-3].UnIntConst, yyvsp[-1].UnIntConst, NULL, NULL);
    break;}
case 36:
#line 137 "grammer.y"
{yyval.UnSet = CreateSetExpr(0, 0, yyvsp[-3].UnID, yyvsp[-1].UnID);
    break;}
case 37:
#line 141 "grammer.y"
{yyval.UnSetList = CreateSetListExpr(yyvsp[0].UnIntConst);
    break;}
case 38:
#line 142 "grammer.y"
{yyval.UnSetList = CreateSetListExpr1(yyvsp[0].UnID);
    break;}
case 39:
#line 143 "grammer.y"
{yyval.UnSetList = AddToSetList(yyvsp[-2].UnSetList, yyvsp[0].UnIntConst);
    break;}
case 40:
#line 144 "grammer.y"
{yyval.UnSetList = AddToSetList1(yyvsp[-2].UnSetList, yyvsp[0].UnID);
    break;}
case 41:
#line 148 "grammer.y"
{yyval.UnVarDec = CreateVariableDeclaration(yyvsp[-2].UnSetList, yyvsp[0].UnTypeSpec, NULL);
    break;}
case 42:
#line 149 "grammer.y"
{yyval.UnVarDec = CreateVariableDeclaration(yyvsp[-3].UnSetList, yyvsp[0].UnTypeSpec, yyvsp[-1].UnArrayList);
    break;}
case 43:
#line 153 "grammer.y"
{yyval.UnArrayList = CreateArrayList(yyvsp[-1].UnSetList);
    break;}
case 44:
#line 154 "grammer.y"
{yyval.UnArrayList = AddToArrayList(yyvsp[-3].UnArrayList, yyvsp[-1].UnSetList);
    break;}
case 45:
#line 158 "grammer.y"
{yyval.UnSetList = CreateConstIntList(yyvsp[0].UnIntConst);
    break;}
case 46:
#line 159 "grammer.y"
{yyval.UnSetList = AddToConstIntList(yyvsp[-2].UnSetList, yyvsp[0].UnIntConst);
    break;}
case 47:
#line 163 "grammer.y"
{yyval.UnSetList = CreateIdList(yyvsp[0].UnID);
    break;}
case 48:
#line 164 "grammer.y"
{yyval.UnSetList = AddToIdList(yyvsp[-2].UnSetList, yyvsp[0].UnID);
    break;}
case 49:
#line 168 "grammer.y"
{yyval.UnVarDecList = CreateVarDeclarationList(yyvsp[-1].UnVarDec);
    break;}
case 50:
#line 169 "grammer.y"
{yyval.UnVarDecList = AddToVarDeclarationList(yyvsp[-2].UnVarDecList, yyvsp[-1].UnVarDec);
    break;}
case 51:
#line 173 "grammer.y"
{yyval.UnTypeSpec = CreateType(EBoolean, NULL);
    break;}
case 52:
#line 174 "grammer.y"
{yyval.UnTypeSpec = CreateType(EChar, NULL);
    break;}
case 53:
#line 175 "grammer.y"
{yyval.UnTypeSpec = CreateType(EInteger, NULL);
    break;}
case 54:
#line 176 "grammer.y"
{yyval.UnTypeSpec = CreateType(EReal, NULL);
    break;}
case 55:
#line 177 "grammer.y"
{yyval.UnTypeSpec = CreateType(ESet, NULL);
    break;}
case 56:
#line 181 "grammer.y"
{yyval.UnVarDecList = CreateVarDeclarationList(yyvsp[0].UnVarDec);
    break;}
case 57:
#line 182 "grammer.y"
{yyval.UnVarDecList = AddToVarDeclarationList(yyvsp[-2].UnVarDecList, yyvsp[0].UnVarDec);
    break;}
case 58:
#line 186 "grammer.y"
{yyval.UnStmt = CreateExprStatement(yyvsp[-1].UnExpr);
    break;}
case 59:
#line 187 "grammer.y"
{yyval.UnStmt = yyvsp[-1].UnStmt;
    break;}
case 60:
#line 188 "grammer.y"
{yyval.UnStmt = yyvsp[-1].UnStmt;
    break;}
case 61:
#line 189 "grammer.y"
{yyval.UnStmt = yyvsp[-1].UnStmt;
    break;}
case 62:
#line 190 "grammer.y"
{yyval.UnStmt = yyvsp[-1].UnStmt;
    break;}
case 63:
#line 194 "grammer.y"
{yyval.UnStmtList = CreateStatementList(yyvsp[0].UnStmt);
    break;}
case 64:
#line 195 "grammer.y"
{yyval.UnStmtList = AddToStatementList(yyvsp[-1].UnStmtList, yyvsp[0].UnStmt);
    break;}
case 65:
#line 199 "grammer.y"
{yyval.UnStmt = CreateCaseStmt(EnCase, yyvsp[-3].UnID, yyvsp[-1].UnOptionList, NULL);
    break;}
case 66:
#line 200 "grammer.y"
{yyval.UnStmt = CreateCaseStmt(EnCase, yyvsp[-5].UnID, yyvsp[-3].UnOptionList, yyvsp[-1].UnStmtList);
    break;}
case 67:
#line 204 "grammer.y"
{yyval.UnOptionList = CreateOptionList(yyvsp[-2].UnLabelListOptions, yyvsp[0].UnStmtList);
    break;}
case 68:
#line 205 "grammer.y"
{yyval.UnOptionList = AddToOptionList(yyvsp[-4].UnOptionList, yyvsp[-2].UnLabelListOptions, yyvsp[0].UnStmtList);
    break;}
case 69:
#line 209 "grammer.y"
{yyval.UnLabelListOptions = CreateLabelListOptions(yyvsp[-2].UnStr,yyvsp[0].UnStr);
    break;}
case 70:
#line 210 "grammer.y"
{yyval.UnLabelListOptions = CreateLabelListOptions(yyvsp[0].UnStr,NULL);
    break;}
case 71:
#line 211 "grammer.y"
{yyval.UnLabelListOptions = AddToLabelListOptions(yyvsp[-4].UnLabelListOptions, yyvsp[-2].UnStr, yyvsp[0].UnStr);
    break;}
case 72:
#line 212 "grammer.y"
{yyval.UnLabelListOptions = AddToLabelListOptions(yyvsp[-2].UnLabelListOptions, yyvsp[0].UnStr, NULL);
    break;}
case 73:
#line 216 "grammer.y"
{yyval.UnStmt = CreateIfStmt(EnIf, yyvsp[-1].UnIfStmtCondition, NULL);
    break;}
case 74:
#line 217 "grammer.y"
{yyval.UnStmt = CreateIfStmt(EnIf, yyvsp[-3].UnIfStmtCondition, yyvsp[-1].UnStmtList);
    break;}
case 75:
#line 221 "grammer.y"
{yyval.UnIfStmtCondition = CreateIfStmtCondition(yyvsp[-2].UnExpr, yyvsp[0].UnStmtList);
    break;}
case 76:
#line 222 "grammer.y"
{yyval.UnIfStmtCondition = AddToIfStmtCondition(yyvsp[-4].UnIfStmtCondition, yyvsp[-2].UnExpr, yyvsp[0].UnStmtList);
    break;}
case 77:
#line 226 "grammer.y"
{yyval.UnStmt = CreateCycle(EnWhile, yyvsp[-3].UnExpr, NULL, yyvsp[-1].UnStmtList, NULL, NULL);
    break;}
case 78:
#line 227 "grammer.y"
{yyval.UnStmt = CreateCycle(EnRepeat, yyvsp[0].UnExpr, NULL, yyvsp[-2].UnStmtList, NULL, NULL);
    break;}
case 79:
#line 228 "grammer.y"
{yyval.UnStmt = CreateCycle(EnFor, yyvsp[-5].UnExpr, yyvsp[-3].UnExpr, yyvsp[-1].UnStmtList, yyvsp[-7].UnID, NULL);
    break;}
case 80:
#line 229 "grammer.y"
{yyval.UnStmt = CreateCycle(EnFor, yyvsp[-7].UnExpr, yyvsp[-5].UnExpr, yyvsp[-1].UnStmtList, yyvsp[-9].UnID, yyvsp[-3].UnIntConst);
    break;}
case 81:
#line 230 "grammer.y"
{yyval.UnStmt = CreateCycle(EnLoop, NULL, NULL, yyvsp[-1].UnStmtList, NULL, 0);
    break;}
case 82:
#line 234 "grammer.y"
{yyval.UnStmt = CreateJumpStmt(EnReturn, NULL);
    break;}
case 83:
#line 235 "grammer.y"
{yyval.UnStmt = CreateJumpStmt(EnReturn, yyvsp[0].UnExpr);
    break;}
case 84:
#line 236 "grammer.y"
{yyval.UnStmt = CreateJumpStmt(EnExit, NULL);
    break;}
case 85:
#line 240 "grammer.y"
{yyval.UnFuncDef = CreateFunction(yyvsp[-13].UnID, yyvsp[-11].UnVarDecList, yyvsp[-8].UnTypeSpec, yyvsp[-5].UnVarDecList, yyvsp[-3].UnStmtList);
    break;}
case 86:
#line 241 "grammer.y"
{yyval.UnFuncDef = CreateFunction(yyvsp[-11].UnID, yyvsp[-9].UnVarDecList, NULL, yyvsp[-5].UnVarDecList, yyvsp[-3].UnStmtList);
    break;}
case 87:
#line 242 "grammer.y"
{yyval.UnFuncDef = CreateFunction(yyvsp[-12].UnID, NULL, yyvsp[-8].UnTypeSpec, yyvsp[-5].UnVarDecList, yyvsp[-3].UnStmtList);
    break;}
case 88:
#line 243 "grammer.y"
{yyval.UnFuncDef = CreateFunction(yyvsp[-10].UnID, NULL, NULL, yyvsp[-5].UnVarDecList, yyvsp[-3].UnStmtList);
    break;}
case 89:
#line 244 "grammer.y"
{yyval.UnFuncDef = CreateFunction(yyvsp[-11].UnID, yyvsp[-9].UnVarDecList, yyvsp[-6].UnTypeSpec, NULL, yyvsp[-3].UnStmtList);
    break;}
case 90:
#line 245 "grammer.y"
{yyval.UnFuncDef = CreateFunction(yyvsp[-9].UnID, yyvsp[-7].UnVarDecList, NULL, NULL, yyvsp[-3].UnStmtList);
    break;}
case 91:
#line 246 "grammer.y"
{yyval.UnFuncDef = CreateFunction(yyvsp[-10].UnID, NULL, yyvsp[-6].UnTypeSpec, NULL, yyvsp[-3].UnStmtList);
    break;}
case 92:
#line 247 "grammer.y"
{yyval.UnFuncDef = CreateFunction(yyvsp[-8].UnID, NULL, NULL, NULL, yyvsp[-3].UnStmtList);
    break;}
case 93:
#line 251 "grammer.y"
{yyval.UnFuncStmtList = CreateFunctionList(yyvsp[0].UnFuncDef);
    break;}
case 94:
#line 252 "grammer.y"
{yyval.UnFuncStmtList = AddToFunctionList(yyvsp[-1].UnFuncStmtList, yyvsp[0].UnFuncDef);
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
#line 487 "bison.simple"

  yyvsp -= yylen;
  yyssp -= yylen;
#ifdef YYLSP_NEEDED
  yylsp -= yylen;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

  *++yyvsp = yyval;

#ifdef YYLSP_NEEDED
  yylsp++;
  if (yylen == 0)
    {
      yylsp->first_line = yylloc.first_line;
      yylsp->first_column = yylloc.first_column;
      yylsp->last_line = (yylsp-1)->last_line;
      yylsp->last_column = (yylsp-1)->last_column;
      yylsp->text = 0;
    }
  else
    {
      yylsp->last_line = (yylsp+yylen-1)->last_line;
      yylsp->last_column = (yylsp+yylen-1)->last_column;
    }
#endif

  /* Now "shift" the result of the reduction.
     Determine what state that goes to,
     based on the state we popped back to
     and the rule number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTBASE];

  goto yynewstate;

yyerrlab:   /* here on detecting error */

  if (! yyerrstatus)
    /* If not already recovering from an error, report this error.  */
    {
      ++yynerrs;

#ifdef YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (yyn > YYFLAG && yyn < YYLAST)
	{
	  int size = 0;
	  char *msg;
	  int x, count;

	  count = 0;
	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
	  for (x = (yyn < 0 ? -yyn : 0);
	       x < (sizeof(yytname) / sizeof(char *)); x++)
	    if (yycheck[x + yyn] == x)
	      size += strlen(yytname[x]) + 15, count++;
	  msg = (char *) malloc(size + 15);
	  if (msg != 0)
	    {
	      strcpy(msg, "parse error");

	      if (count < 5)
		{
		  count = 0;
		  for (x = (yyn < 0 ? -yyn : 0);
		       x < (sizeof(yytname) / sizeof(char *)); x++)
		    if (yycheck[x + yyn] == x)
		      {
			strcat(msg, count == 0 ? ", expecting `" : " or `");
			strcat(msg, yytname[x]);
			strcat(msg, "'");
			count++;
		      }
		}
	      yyerror(msg);
	      free(msg);
	    }
	  else
	    yyerror ("parse error; also virtual memory exceeded");
	}
      else
#endif /* YYERROR_VERBOSE */
	yyerror("parse error");
    }

  goto yyerrlab1;
yyerrlab1:   /* here on error raised explicitly by an action */

  if (yyerrstatus == 3)
    {
      /* if just tried and failed to reuse lookahead token after an error, discard it.  */

      /* return failure if at end of input */
      if (yychar == YYEOF)
	YYABORT;

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif

      yychar = YYEMPTY;
    }

  /* Else will try to reuse lookahead token
     after shifting the error token.  */

  yyerrstatus = 3;		/* Each real token shifted decrements this */

  goto yyerrhandle;

yyerrdefault:  /* current state does not do anything special for the error token. */

#if 0
  /* This is wrong; only states that explicitly want error tokens
     should shift them.  */
  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  if (yyn) goto yydefault;
#endif

yyerrpop:   /* pop the current state because it cannot handle the error token */

  if (yyssp == yyss) YYABORT;
  yyvsp--;
  yystate = *--yyssp;
#ifdef YYLSP_NEEDED
  yylsp--;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "Error: state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

yyerrhandle:

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yyerrdefault;

  yyn += YYTERROR;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
    goto yyerrdefault;

  yyn = yytable[yyn];
  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrpop;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrpop;

  if (yyn == YYFINAL)
    YYACCEPT;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting error token, ");
#endif

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  yystate = yyn;
  goto yynewstate;
}
#line 254 "grammer.y"
